package smartrpc.boot.starter.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import smartrpc.boot.starter.component.SmartRPCClientInit;
import smartrpc.boot.starter.component.SmartRPCServerInit;

import javax.annotation.PostConstruct;

/**
 * Created By gao_e on 2020/3/7 21:22
 * smart-rpc-starter自动配置类
 */
@Configuration
@EnableConfigurationProperties(SmartRPCProperties.class)
@Import({SmartRPCClientInit.class, SmartRPCServerInit.class})
public class SmartRPCAutoConfiguration {

    @Autowired
    private SmartRPCProperties smartRPCProperties;

    @PostConstruct
    public void log() {
        System.out.println("已经加载完Smart RPC相关自动配置");
        System.out.println("SmartRPCProperties = " + smartRPCProperties);
    }

}
